using GameFramework.Fsm;
using UnityGameFramework.Runtime;

namespace StarForce
{
    public class EliminateGame : GameBase
    {
        public override GameMode GameMode
        {
            get { return GameMode.Eliminate; }
        }
        
        private IFsm<EliminateGame> m_EliminateGameFSM;
        
        private EliminateFSM[] m_State = new EliminateFSM[]
        {
            new EliminateReadFSM(), new EliminateStartFSM(), new EliminateEndFSM(), 
        };
        
        public override void Initialize()
        {
            base.Initialize();
            m_EliminateGameFSM = GameEntry.Fsm.CreateFsm("Eliminate", this, m_State);
            m_EliminateGameFSM.Start<EliminateReadFSM>();
        }

        public override void Shutdown()
        {
            base.Shutdown();
            
            GameEntry.Fsm.DestroyFsm(m_EliminateGameFSM);
            
            GameEntry.Eliminate.ClearAll();
        }
    }
}